import service from "../../service/api";

export function getRoleList(params) {
  return service({
    url: "/system/role/list",
    method: "get",
    params,
  });
}

// 新增角色
export function addRole(data) {
    return service({
      url: '/system/role',
      method: 'post',
      data: data
    })
  }
  
  // 修改角色
  export function updateRole(data) {
    return service({
      url: '/system/role',
      method: 'put',
      data: data
    })
  }

  // 查询角色详细
export function getRole(roleId) {
    return service({
      url: '/system/role/' + roleId,
      method: 'get'
    })
  }

  export function delRole(roleId) {
    return service({
      url: '/system/role/' + roleId,
      method: 'delete'
    })
  }